基于vlmcsd搭建的KMS服务器。(Centos7)

KMS Emulator in C (currently runs on Linux including Android, FreeBSD, Solaris, Minix, Mac OS, iOS, Windows with or without Cygwin)

vlmcsd论坛源文地址:https://forums.mydigitallife.net/threads/emulated-kms-servers-on-non-windows-platforms.50234/

github:https://github.com/Wind4/vlmcsd

官方激活方法及GVLKs码:http://wind4.github.io/vlmcsd/

适用于 centos 8 安装

rpm 下载地址 https://github.com/taur-firiath/vlmcsd-el8 # 具体下载地址 https://github.com/taur-firiath/vlmcsd-el8/releases/tag/svn1113-1

[root@web ~]# dnf install https://github.com/taur-firiath/vlmcsd-el8/releases/download/svn1113-1/vlmcsd-svn1113-1.el8.x86_64.rpm
[root@web ~]# dnf search vlmcsd
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:00:42 ago on Fri 20 Nov 2020 08:44:55 AM CST.
===================================================================== Name Exactly Matched: vlmcsd =====================================================================
vlmcsd.x86_64 : A fully Microsoft compatible KMS server

[root@web ~]# find / -name vlmcs*
/etc/vlmcsd
/etc/vlmcsd/vlmcsd.ini
/etc/vlmcsd/vlmcsd.kmd
/usr/bin/vlmcs
/usr/bin/vlmcsd
/usr/lib/systemd/system/vlmcsd.service
/usr/share/man/man1/vlmcs.1.gz
/usr/share/man/man5/vlmcsd.ini.5.gz
/usr/share/man/man7/vlmcsd.7.gz
/usr/share/man/man8/vlmcsd.8.gz

[root@web ~]# dnf -y install vlmcsd
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:02:39 ago on Fri 20 Nov 2020 08:44:55 AM CST.
Package vlmcsd-svn1113-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@web ~]# systemctl enable vlmcsd
Created symlink /etc/systemd/system/multi-user.target.wants/vlmcsd.service → /usr/lib/systemd/system/vlmcsd.service.
[root@web ~]# systemctl start vlmcsd
[root@web ~]# ps -ef|grep vlmcsd
vlmcsd      1125       1  0 08:52 ?        00:00:00 /usr/bin/vlmcsd -i /etc/vlmcsd/vlmcsd.ini -D
root        5721    5600  0 08:53 pts/0    00:00:00 grep --color=auto vlmcsd

[root@web ~]# systemctl status vlmcsd
● vlmcsd.service - Vlmcsd (KMS Emulator in C)
   Loaded: loaded (/usr/lib/systemd/system/vlmcsd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-11-20 08:52:16 CST; 1min 50s ago
 Main PID: 1125 (vlmcsd)
    Tasks: 1 (limit: 22101)
   Memory: 376.0K
   CGroup: /system.slice/vlmcsd.service
           └─1125 /usr/bin/vlmcsd -i /etc/vlmcsd/vlmcsd.ini -D

Nov 20 08:52:16 web systemd[1]: Started Vlmcsd (KMS Emulator in C).

适用于 centos 7

下载vlmcsd

https://forums.mydigitallife.net/threads/emulated-kms-servers-on-non-windows-platforms.50234/

下载得到下面的文件vlmcsd-1111-2017-06-17-Hotbird64.7z(目前最新版本)

解压 找到下面的文件:

\vlmcsd-1111-2017-06-17-Hotbird64\binaries\Linux\intel\static\vlmcsd-x64-musl-static

github:

[root@web ~]# wget https://github.com/Wind4/vlmcsd/releases/download/svn1113/binaries.tar.gz
[root@web ~]# tar -zxvf binaries.tar.gz

[root@web ~]# cp binaries/Linux/intel/static/vlmcsd-x64-musl-static /usr/bin/vlmcsd

这里使用64位的版本,如果是32位的请选择X86版本。也可选择vlmcsdmulti-x64-musl-static(或者vlmcsdmulti-x86-musl-static)一个

将vlmcsd-x64-musl-static文件重命名为vlmcsd

上传vlmcsd文件到/usr/bin/目录下并设置755的权限:


[root@kms ~]# chmod -R 0755 /usr/bin/vlmcsd

添加vlmcsd服务

新建一个空的vlmcsd.pid文件, 用来存放PID的文件,便于后来添加service时要用到

[root@kms ~]# vi /var/run/vlmcsd.pid

新建vlmcsd.service的文档,并添加以下内容:

[root@kms ~]# vi /lib/systemd/system/vlmcsd.service
[Unit]
Description=KMS Server By vlmcsd
After=network.target

[Service]
Type=forking
PIDFile=/var/run/vlmcsd.pid
ExecStart=/usr/bin/vlmcsd -p /var/run/vlmcsd.pid
ExecStop=/bin/kill -HUP $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

重载服务

[root@kms ~]# systemctl daemon-reload

启动vlmcsd服务

[root@kms ~]# systemctl start vlmcsd
[root@kms ~]# systemctl enable vlmcsd
Created symlink from /etc/systemd/system/multi-user.target.wants/vlmcsd.service   to /usr/lib/systemd/system/vlmcsd.service.
[root@kms ~]# systemctl status vlmcsd
● vlmcsd.service - KMS Server By vlmcsd
   Loaded: loaded (/usr/lib/systemd/system/vlmcsd.service; enabled; vendor preset: disabled)
   Active: active (running) since 三 2018-05-23 23:13:01 CST; 21s ago
 Main PID: 2745 (vlmcsd)
   CGroup: /system.slice/vlmcsd.service
           └─2745 /usr/bin/vlmcsd -p /var/run/vlmcsd.pid

5月 23 23:13:01 kms.ktxsz.local systemd[1]: Starting KMS Server By vlmcsd...
5月 23 23:13:01 kms.ktxsz.local systemd[1]: Failed to read PID from file /v...t
5月 23 23:13:01 kms.ktxsz.local systemd[1]: Started KMS Server By vlmcsd.
Hint: Some lines were ellipsized, use -l to show in full.

设置防火墙

[root@kms ~]# firewall-cmd --zone=public --add-port=1688/tcp --permanent
success
[root@kms ~]# firewall-cmd --reload
success

测试服务器连接:

kms测试工具

至此,vlmcsd 配置完成,已经可以使用此程序进行激活。

激活方法:

注:kms激活只适用于VL版本的系统!

管理员模式打开命令提示符输入

•激活Windows

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX // 对应系统的GVLKs码
slmgr /skms [服务器地址]          //设置KMS激活服务器地址     
slmgr /ato                       //激活系统

•激活Office

OFFICE必须是VOL版本,否则无法激活。

找到你的office安装目录,比如C:\Program Files (x86)\Microsoft Office\Office16
64位的就是C:\Program Files\Microsoft Office\Office16
office16是office2016,office15就是2013,office14就是2010。
然后目录对的话,该目录下面应该有个OSPP.VBS。

# 进入office安装目录
cd "C:\Program Files\Microsoft Office\Office16" 
# 替换VOL的密钥
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
# 注册kms服务器地址
cscript ospp.vbs /sethst:you-kms-server
# 执行激活
cscript ospp.vbs /act
# 查看状态
CSCRIPT OSPP.VBS /DSTATUS

pause

windows xp 下激活office 2010

注意对应的安装目录

cscript "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /inpkey: VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB # Office Professional Plus 2010 | VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB | | Office Standard 2010 | V7QKV-4XVVR-XYV4D-F7DFM-8R6BM  
cscript "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /sethst:you-kms-server
cscript "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /act
cscript "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /DSTATUS
附 windows kms

\vlmcsd-1111-2017-06-17-Hotbird64\binaries\Windows\intel\vlmcs-Windows-x64.exe

选择32还是64请根据实际情况来

./vlmcs-Windows-x64.exe -v -l 3 you.host.ip
# -v输出详细信息
# -l 3表示发送Windows 10 Enterprise 2016 LTSB的激活请求,具体版本对应列表可以通过./vlmcs-Windows-x64.exe -x查看

如果,你不知道你的系统是什么版本,那么。。。

> wmic os get caption
Caption
Microsoft Windows 10 企业版 2016 长期服务版